<?php 


	if(!isset($_SESSION['username'])){
		echo "<script>alert('请登录！');window.location.href='index.php?m=admin&c=manage'</script>";die;
	}
	
	
	//权限管理
	authonity($con);
	
	$data = dbselOne($con,'contact_us','*',1);


	assign('data',$data);



	if($_POST){
		$data['telephone'] = htmlspecialchars(trim($_POST['telephone'],''));

		$data['name'] = htmlspecialchars(trim($_POST['name'],''));

		$data['email'] = htmlspecialchars(trim($_POST['email'],''));

		$data['address'] = htmlspecialchars(trim($_POST['address'],''));


		
			

			

		$query = dbupdate($con,'contact_us',$data,"id=1");


		if($query){
			message('修改成功','index.php?m=admin');
		}else{

			message('修改失败','',0);
		}
	}


?>